<h1>Listing brands</h1>

<table>
  <tr>
    <th>Name</th>
    <th>Description</th>
    <th>Image url</th>
    <th>Sort order</th>
    <th>Active</th>
  </tr>

<% for brand in @brands %>
  <tr>
    <td><%=h brand.name %></td>
    <td><%=h brand.description %></td>
    <td><%= image_tag url_for_file_column(brand, "image_url","thumb") if brand.image_url %></td>
    <td><%=h brand.sort_order %></td>
    <td><%=h brand.active %></td>
    <td><%= link_to 'Show', brand %></td>
    <td><%= link_to 'Edit', edit_brand_path(brand) %></td>
    <td><%= link_to 'Destroy', brand, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New brand', new_brand_path %>
